package com.tanhan.mindapp.dao;

import java.io.Serializable;
import java.util.Date;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

@Data
@Schema(description = "基础实体类")
public class BaseEntity extends PageEntity implements Serializable
{
    private static final long serialVersionUID = 1L;

    /** id */
    @TableId(value = "id")
    @Schema(description = "主键ID", example = "1")
    private String id;

    /** 创建者 */
    @TableField("create_by")
    @Schema(description = "创建者", example = "王二狗")
    private String createBy;

    /** 创建时间 */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @TableField("create_time")
    @Schema(description = "创建时间", example = "2023-01-01 12:00:00")
    private Date createTime;

    /** 更新者 */
    @TableField("update_by")
    @Schema(description = "更新者", example = "李四")
    private String updateBy;

    /** 更新时间 */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @TableField("update_time")
    @Schema(description = "更新时间", example = "2023-01-01 12:00:00")
    private Date updateTime;

    /** 备注 */
    @TableField("remark")
    @Schema(description = "备注信息", example = "这是备注内容")
    private String remark;
}
